xen/arm: gic-v3: Implement correctly the callback send_SGI
authorJulien Grall <julien.grall@citrix.com>
Fri, 8 May 2015 17:01:12 +0000 (18:01 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 21 May 2015 14:12:10 +0000 (15:12 +0100)
commit8c1ed6d0c08c8139c42ce0a12121b268ea144a52
tree0cf6341a4a5bb04191b76b09101f83860f6637b2
parent21fb45ddaf9efd066bad87073d2ae459c9bb04bf
xen/arm: gic-v3: Implement correctly the callback send_SGI

Currently, the GICv3 driver is only able to send an SGI when the cpumask
is provided. Although with the modes SGI_TARGET_OTHERS and SGI_TARGET_SELF,
no cpumask is provided. Any usage of those modes will crash the hypersivor.

Rename gicv3_send_sgi to gicv3_send_sgi_list and implement the
different modes:
    - SGI_TARGET_OTHERS: Set the Interrupt Routing Mode (bit 40) to 1
    (see Table 4 on Section 4.2.6 PRD03-GENC-010745 24.0)
    - SGI_TARGET_SELF: Unlike GICv2, the GICv3 SGI registers don't
    provide a specific field. So use gicv3_send_sgi_list and pass
    the cpumask of the current CPU
    - SGI_TARGET_LIST: Directly call gicv3_send_sgi_list with the given
    cpumask

Also, use WRITE_SYSREG64 to write into ICC_SGI1R_EL1 the access is
64-bit on all the architectures.

Reported-by: Chen Baozi <baozich@gmail.com>
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Tested-by: Chen Baozi <baozich@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/gic-v3.c
xen/include/asm-arm/gic_v3_defs.h